

project(bonddict)

find_package(Qt5 COMPONENTS Core REQUIRED)

file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS ./*.cpp)
source_group_by_dir(SRCS)

add_library(${PROJECT_NAME} SHARED
     ${SRCS}
)

if (WINDOWS)
    target_compile_options(${PROJECT_NAME} PRIVATE -DS_BONDDICT_DLL /wd4251)
    target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core core bondlib qbprotocol qbkernel qbtools uam)
elseif (LINUX)
    target_compile_options(${PROJECT_NAME} PRIVATE -DS_BONDDICT_DLL -fpermissive)
    target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core core bondlib qbkernel qbtools uam)
elseif (MACOS)
    target_compile_options(${PROJECT_NAME} PRIVATE -DS_BONDDICT_DLL -fpermissive)
    target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core core bondlib qbprotocol qbkernel qbtools uam)
endif()
